package com.xnyzc.lhy.common.penum.order;

/**
 * @Description 账号状态
 * @Author wangshuo
 * @Date 2019-08-26 18:46
 **/
public enum ELoginFlag {

    no(0, "停用"),
    yes(1, "启用");

    private Integer value;
    private String desc;

    ELoginFlag(Integer value, String desc){
        this.value = value;
        this.desc = desc;
    }

    public static ELoginFlag findStatus(Integer type) {
        ELoginFlag eVehicleType;
        switch (type) {
            case 0:
                eVehicleType = ELoginFlag.no;
                break;
            case 1:
                eVehicleType = ELoginFlag.yes;
                break;
            default:
                throw new IllegalArgumentException("未设置");
        }
        return eVehicleType;
    }

    public String getDesc() {
        return desc;
    }

    public Integer getValue() {
        return value;
    }
}
